package com.dwsoft.word;

import com.dwsoft.xml.XHeading3;
import com.dwsoft.xml.XmlNode;
import org.springframework.stereotype.Component;
import word.w2004.Document2004;
import word.w2004.elements.Heading3;

import java.io.IOException;
import java.util.List;

/**
 * @author sqw
 * @version 1.0
 * @description TODO
 * @ClassName Heading1Strategy
 * @Date 2020/8/5
 * @since jdk1.8
 */
@Component("heading3")
public class WHeading3 extends WElement<XHeading3> {
    @Override
    public void instance(XHeading3 xmlNode, Document2004 document) throws Exception {
        document.addEle(Heading3.with(xmlNode.getValue()).widthSerial(xmlNode.getIndex()));
        List<XmlNode> childrens = xmlNode.getXmlNodes();
        addChild(childrens,xmlNode,document);
    }
}
